package platform.udp.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;
import platform.udp.client.MyClientHandler;

public class MyChannelInitializer extends ChannelInitializer<NioDatagramChannel> {
    private EventLoopGroup group = new NioEventLoopGroup();


    @Override
    protected void initChannel(NioDatagramChannel nioDatagramChannel) throws Exception {
        ChannelPipeline pipeline = nioDatagramChannel.pipeline();
        pipeline.addLast(group,new MyServerHandler());
    }



}
